package com.beiding.beans;

import org.springframework.stereotype.Component;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.io.IOException;

//权限拦截器
//@Component
public class Authority implements Filter {
    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {


        HttpServletRequest r = (HttpServletRequest) request;


        final HttpSession session = r.getSession();


        System.out.println(session);

        //首先获取当前用户的权限,查看是否具有

        session.getAttributeNames();


    }
}
